<?php
$this->breadcrumbs = array(
    'Slides Management' => 'index',
);
?>
<div class="row-fluid">
    <div class="span12">
        <!--PAGE CONTENT BEGINS-->
        <div class="row-fluid">
            <div class="span12">
                <div class="span6">
                    <a href="<?php echo Yii::app()->createUrl('admin/slide/create'); ?>" class="btn btn-primary"
                       title="Create New Album">
                        <i class='icon-plus'></i>
                        Upload
                    </a>
                </div>
            </div>
        </div>
        <hr>
        <div class="row-fluid">
            <div class="table-header">Slides Management</div>
            <table id="sample-table-2" class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th width="100">Photo</th>
                        <th width="42">Priority</th>
                        <th width="100"> Title</th>
                        <th width="200"> Description </th>
                        <th width="100"> Status</th>
                        <th width="42"></th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                        foreach ($data as $key => $value):
                        ?>
                        <tr>
                            <td><img src="<?php echo Yii::app()->baseUrl.'/timthumb.php?src=' . Yii::app()->baseUrl .'/images/'. $value['name']?>&h=100&w=100"></td>
                            <td><?php echo $value['priority'];?></td>
                            <td><?php echo $value['title'];?></td>
                            <td><?php echo $value['description'];?></td>
                            <td> 
                                <?php 
                                    if($value->disabled):
                                        echo '<span class="label label-success arrowed">'.MyFunctionCustom::$status[$value->disabled].'</span>';
                                    else:
                                        echo '<span class="label label-default arrowed">'.MyFunctionCustom::$status[$value->disabled].'</span>';
                                    endif;?>
                            </td>
                            <td class="td-actions">
                                <div class="hidden-phone visible-desktop action-buttons">
                                    <a class="green" href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/update', array('id' => $value->id)); ?>">
                                        <i class="icon-pencil bigger-130"></i>
                                    </a>
                                    <a class="red" href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/delete', array('id' => $value->id)); ?>">
                                        <i class="icon-trash bigger-130"></i>
                                    </a>
                                </div>
                                <div class="hidden-desktop visible-phone">
                                    <div class="inline position-relative">
                                        <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                            <i class="icon-caret-down icon-only bigger-120"></i>
                                        </button>
                                        <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
                                            <li>
                                                <a href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/update', array('id' => $value->id)); ?>" class="tooltip-success" data-rel="tooltip" title="Edit">
                                                    <span class="green">
                                                        <i class="icon-edit bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                             <li>
                                                <a href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/delete', array('id' => $value->id)); ?>" class="tooltip-info" data-rel="tooltip" title="Delete">
                                                    <span class="blue">
                                                        <i class="icon-trash bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </td> 
                        </tr>
                    <?php
                    endforeach;
                    ?>
                </tbody>
            </table>
        </div>
        <!--PAGE CONTENT ENDS-->
    </div>
    <!--/.span-->
</div><!--/.row-fluid-->